package net.sx.minemodule.mvp.activities;

import android.os.Bundle;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.homegoods.aroutercomment.ARouterPath;
import com.kedll.library.adapter.MultiTypeAdapter;
import com.kedll.library.base.KRefreshListActivity;
import com.kedll.library.util.MyUtils;

import net.sx.minemodule.R;
import net.sx.minemodule.databinding.MineActivityInviteBinding;
import net.sx.minemodule.mvp.bean.InviteBean;
import net.sx.minemodule.mvp.presenters.MineInvitePresenter;

/**
 * @author QiQi
 * @ClassName: MineInviteActivity
 * @date 2019/12/13
 * @description 我的邀请
 */
@Route(path = ARouterPath.PATH_MINE_WITH_DRAW_INVITE)
public class MineInviteActivity extends KRefreshListActivity<MineActivityInviteBinding, MineInvitePresenter> {
    @Override
    protected void initToolBar(Bundle savedInstanceState) {
        super.initToolBar(savedInstanceState);
        ARouter.getInstance().inject(this);
        setTitle("我的邀请");
    }

    @Override
    protected void initData(Bundle savedInstanceState) {
        super.initData(savedInstanceState);
        appBarLayout.setBackgroundResource(R.color.color_f6f6f6);
        refreshLayout.setBackgroundResource(R.color.white);
        list.setPadding(MyUtils.dp2px(16), MyUtils.dp2px(16), MyUtils.dp2px(16), 9);
        list.setClipToPadding(false);
        refreshLayout.setClipToPadding(false);
    }

    @Override
    protected void initEvent() {
        super.initEvent();
        adapter.setOnItemClickListener((MultiTypeAdapter.OnItemClickListener<InviteBean>) (v, iItem) -> {
            //TODO
        });
    }

    @Override
    protected MineInvitePresenter getPresenter() {
        return new MineInvitePresenter(this);
    }

    @Override
    protected int getLayout() {
        return R.layout.mine_activity_invite;
    }
}
